
#ifndef FH_DMA_MISCDEV_H_
#define FH_DMA_MISCDEV_H_

#include <linux/dmaengine.h>


#define DEVICE_NAME                 "fh_dma_misc"
#define PROC_FILE                   "driver/dma_misc"

#define DMA_IOCTL_MAGIC             'd'
#define RESERVERD                   _IO(DMA_IOCTL_MAGIC, 0)
#define REQUEST_CHANNEL             _IOWR(DMA_IOCTL_MAGIC, 1, __u32)
#define DMA_MEMCOPY                 _IOWR(DMA_IOCTL_MAGIC, 2, __u32)
#define DMA_MEMCOPY_CROP            _IOWR(DMA_IOCTL_MAGIC, 3, __u32)
#define DMA_MEMCOPY_SCA_TO_GAT      _IOWR(DMA_IOCTL_MAGIC, 4, __u32)
#define DMA_MEMCOPY_FROM_LINE    _IOWR(DMA_IOCTL_MAGIC, 5, __u32)
#define DMA_MEMCOPY_TO_LINE    _IOWR(DMA_IOCTL_MAGIC, 6, __u32)
#define DMA_MEMCOPY_USR_DEF    _IOWR(DMA_IOCTL_MAGIC, 7, __u32)
#define DMA_IOCTL_MAXNR             14

#define DMA_MEMCPY_TIMEOUT          5000 //msec

#define DMA_MEMCPY_CROP_FLAG		(0x01)
#define DMA_MEMCPY_S2G_FLAG			(0x02)
struct dma_memcpy {
	int chan_id;
	void *src_addr_vir;
	void *dst_addr_vir;
	unsigned int size;
	unsigned int src_addr_phy;
	unsigned int dst_addr_phy;
	unsigned long flag;
	struct dma_crop *dma_crop_config;
	struct dma_sca_gat *dma_s2g_info;
	struct dma_line_gap_cpy *p_lg_cpy;
	unsigned int usr_desc_size;
	struct dma_cpy_usr_def_desc *p_usr_desc;
};



#endif /* FH_DMA_MISCDEV_H_ */
